<!DOCTYPE html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Unity WebGL Player | webgl</title>
    <link rel="shortcut icon" href="TemplateData/favicon.ico">
    <link rel="stylesheet" href="TemplateData/style.css">
    <script src="TemplateData/UnityProgress.js"></script>
    <script src="Build/UnityLoader.js"></script>
    <script>
      var gameInstance = UnityLoader.instantiate("gameContainer", "Build/web.json", {onProgress: UnityProgress});
      function Reset()
      {
          var canvas = document.getElementById("#canvas");//获取#canvas
          var h=  document.documentElement.clientHeight;//获取body可见区域高度
          var w =  document.documentElement.clientWidth;//获取body可见区域高度
          var scale = 640/1136;
          if (w/h > scale) {canvas.height=h;canvas.width=h*scale;}
          if (w/h < scale) {canvas.height=w/scale;canvas.width=w;}
          console.log(canvas.width,canvas.height)
      }
    </script>
  </head>
  <body onload="Reset()" onresize="Reset()">
    <div class="webgl-content" >
      <div id="gameContainer" style="width: 100%; height: 100%"></div>
      <!-- <div class="footer">
        <div class="webgl-logo"></div>
        <div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
        <div class="title">webgl</div>
      </div> -->
    </div>
  </body>
</html>